package jy.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Ttraderecord entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ttraderecord", catalog = "jlubank")
public class Ttraderecord implements java.io.Serializable {

	// Fields

	private String id;
	private Taccount taccount;
	private Tuser tuser;
	private float money;
	private Date tradedate;
	private String tradeType;

	// Constructors

	/** default constructor */
	public Ttraderecord() {
	}

	/** minimal constructor */
	public Ttraderecord(String id) {
		this.id = id;
	}

	/** full constructor */
	public Ttraderecord(String id, Taccount taccount, Tuser tuser, float money,
			Date tradedate, String tradeType) {
		this.id = id;
		this.taccount = taccount;
		this.tuser = tuser;
		this.money = money;
		this.tradedate = tradedate;
		this.tradeType = tradeType;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "acid")
	public Taccount getTaccount() {
		return this.taccount;
	}

	public void setTaccount(Taccount taccount) {
		this.taccount = taccount;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "uid")
	public Tuser getTuser() {
		return this.tuser;
	}

	public void setTuser(Tuser tuser) {
		this.tuser = tuser;
	}

	@Column(name = "money", precision = 12, scale = 0)
	public float getMoney() {
		return this.money;
	}

	public void setMoney(float money) {
		this.money = money;
	}

	@Column(name = "tradedate", length = 0)
	public Date getTradedate() {
		return this.tradedate;
	}

	public void setTradedate(Date tradedate) {
		this.tradedate = tradedate;
	}

	@Column(name = "tradeType")
	public String getTradeType() {
		return this.tradeType;
	}

	public void setTradeType(String tradeType) {
		this.tradeType = tradeType;
	}

}